package com.toumy.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.toumy.domain.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface BookDao extends BaseMapper<Book> {

    @Select("select * from books where cate = #{cate}")
    List<Book> selectByCate(int cate);

    @Select("select * from books where owner = #{owner}")
    List<Book> selectByOwner(int owner);
}
